import yagmail
import yaml,logging
def qudong(file):
    with open(file,'r',encoding='utf-8') as f:
        return yaml.safe_load(f)

def log():
    logging.basicConfig(
        filename='log1.log',
        filemode='w+',
        level=logging.DEBUG,
        format='%(message)s' '%(levelname)s' '%(filename)s' '%(asctime)s' '%(lineno)d'
    )
def youjian(file):
    mail=yagmail.SMTP(user='2018675435@qq.com',password='nnqakcckuzyqfebd',host='smtp.qq.com')
    mail.send(to='2018675435@qq.com',subject='126',contents='内容',attachments=file)
    return file

